﻿app.controller('OrganizationDashboardController', ['$scope', 'GlobalService', 'fileUpload', 'ApplicationService', 'alertboxservice', function ($scope, GlobalService, fileUpload, ApplicationService, alertboxservice) {
    
    
    BindGrid();

    function BindGrid() {
        url = "Organization/GetOrganizationDashboard";
        ApplicationService.Getdatas(url).success(function (data) {
            $scope.chuchinfo = data;
        });

        url = "Church/GetChurchBirthDay";
        ApplicationService.Getdatas(url).success(function (data) {
            $scope.BirthDay = data;
        });

        url = "Organization/GetNotifications";
        ApplicationService.Getdatas(url).success(function (data) {
            $scope.RecentActivity = data;
        });


        
    }

    GlobalService.GetChurchWorkerDesignation().success(function (responce) {
        $scope.churchworkervsDesignationvalues = responce;
        
        /*$scope.xaxis = [];
        $scope.yaxis = [];
        for (var i = 0; i <= responce.length - 1; i++) {
            $scope.xaxis.push(responce[i].ChurchWorkerDesignationName);
            $scope.yaxis.push(responce[i].Counts);
        }*/
    });



}]);


